package cn.tedu.controller;

import cn.tedu.pojo.Car;
import cn.tedu.service.CarServiceImel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("car")
public class CarController {
    @Autowired
    private CarServiceImel cs;
    //@RequestMapping("get")
    //public Car get(Car car) throws Exception {
    //    CarServiceImel cs = new CarServiceImel();
    //    cs.get(car);
    //    return car;
    //}
    @RequestMapping("get")
    public Car get() throws Exception {
        //CarServiceImel cs = new CarServiceImel();
        return cs.get();
    }
}
